Repository navigation
Conversation
Documentation build overview
17 files changed ·
|
|
@gpshead Would you like to check for this doc improvement? |
| tools. | ||
|
|
||
| When *strict_descriptor* is true (the default), unsigned descriptors are | ||
| not detectable, and unreferenced entries using them are not recognized and |
There was a problem hiding this comment.
"Unsigned descriptors are not detectable" is wrong. They are detectable with strict_descriptor=False. They are just not detected by default. It should stay "are not detected". The code confirms this: the unsigned-descriptor fallback in _validate_local_file_entry runs only when not self.strict_descriptor
There was a problem hiding this comment.
They are detectable with strict_descriptor=False is same as the original sentence When *strict_descriptor* is true (the default) , unsigned descriptors are not detectable.
I prefer "not detectable" than "not detected" here since it better reflects the fact that unsigned descriptors cannot be detected by the scanning algorithm using the default arguments.
| :class:`ZipInfo` to :meth:`repack` to ensure the data is removed | ||
| regardless of how the entry was written. | ||
| forensically recoverable. To completely delete the data and reclaim | ||
| space, call :meth:`repack` afterwards (preferably passing the returned |
There was a problem hiding this comment.
"Preferably" undersells it. For entries written with unsigned descriptors, passing removed is the only way the default scan reclaims them, not just preference.
There was a problem hiding this comment.
What would you recommend, then?
After all, passing removed is not the only way to reclaim an entry with unsigned descriptor since it can also be done by passing strict_descriptor=False. So it is still the preferable rather than mandatory way.
If a stronger word is preferred, what about "prudently" or "advisably"?
| tools; signed descriptors—written by Python and other modern tools—are always | ||
| detected. When *strict_descriptor* is true (the default), only signed data |
There was a problem hiding this comment.
Dropping the claim that "signed descriptors are always detected" is unnecessarily removing reassurance that Python-written archives are unaffected.
There was a problem hiding this comment.
I agree the argument but still don't like the original structure.
What about adding a note at the last of this paragraph? Such as:
Unsigned descriptors have been deprecated by the `PKZIP Application Note`_
since version 6.3.0 (released in 2006) and are rarely produced by modern
tools, and descriptors written by Python `zipfile` are always signed.
Thanks for the reviewers for accepting PR #134627, this is a following slight rephrase of the documentation to make it more concise and readable.